package com.enjoyor.soa.traffic.frame.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

import com.enjoyor.soa.traffic.frame.support.validator.DateValidator;

@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR,
        ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = { DateValidator.class })
public @interface DateCheck {

    // 默认的消息模版
    String message() default "";

    // 约束条件属于哪(些)个校验组
    Class<?>[] groups() default {};

    // 约束条件指定严重级别
    Class<? extends Payload>[] payload() default {};
    
    // 默认的时间格式
    String format() default "yyyy-MM-dd HH:mm:ss";


}
